package LuoGu.贪心.部分背包问题;

import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        double t = s.nextDouble();
        double anss = 0;
        double [][] ans = new double [n][3];
        for(int i=0;i<n;i++){
            ans[i][0] = s.nextDouble();
            ans[i][1] = s.nextDouble();
            ans[i][2] = ans[i][1]/ans[i][0];
        }
        Arrays.sort(ans, new Comparator<double[]>() {
            @Override
            public int compare(double[] o1, double[] o2) {
                if(o2[2]>=o1[2]) return 1;
                else return -1;
            }
        });
        int i = 0;
        while(t!=0){
            if(ans[i][0]>=t){
                anss += ans[i][2]*t;
                t = 0;
            }else{
                t-=ans[i][0];
                anss+=ans[i][1];
                i++;
            }
            if(i==n) break;
        }
        System.out.print(String.format("%.2f",anss));
    }
}
